for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import AbstractMenuItemDispatcher from './AbstractMenuItemDispatcher';
import { svgIcon } from '../MDI';
import { setBlockTypeNoAttrCheck } from '../../../customCommands';
import MenuItem from '../MenuItem';
export default class CodeMenuItemDispatcher extends AbstractMenuItemDispatcher {
static isAvailable(schema) {
return !!schema.nodes.code_block;
}
static getMenuItem(schema) {
if (!this.isAvailable(schema)) {
throw new Error('Code blocks not available in this Schmea!');
return new MenuItem({
command: setBlockTypeNoAttrCheck(schema.nodes.code_block),
icon: svgIcon('code-braces'),
label: LANG.plugins.prosemirror['label:code'],
LANG
/** global: LANG */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
});
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.